
export const useUserStore = defineStore('user', () => {
    // state
    const name = ref('tom')
    const age = ref(18)
    
    // getters
    const info = computed(() => `${name.value} is ${age.value} years old`)
    
    // actions
    function grow() {
        age.value++
    }
    
    return { name, age, info, grow }
})